package com.nami.gchat.types.utils;

public class MsgUtil {

    public static final String TEMPLATE_REPEAT_MSG_KEY = "nami:%s:message:user:%s:cacheClientMsgId:%s";

    private static final String TEMPLATE_CONVER_SEQ_KEY = "nami:%s:message:max_seq:%s";

    public static String genRepeatMsgKey(String appKey, String userId, String clientMsgId) {
        return String.format(TEMPLATE_REPEAT_MSG_KEY, appKey, userId, clientMsgId);
    }

    public static String generateConverSeqKey(String appKey, String cid) {
        return String.format(TEMPLATE_CONVER_SEQ_KEY, appKey, cid);
    }


    //    public static void main(String[] args) {
//        System.out.println(String.format(TEMPLATE_REPEAT_MSG_KEY, "test", "12", "xve23gb23"));
//    }

}
